package com.sele.browers;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.DesiredCapabilities;

/**
 *  firefox dirver 下载地址
 *  https://github.com/mozilla/geckodriver/releases
 * @author Admin
 *
 */
public class FireFoxDriverImp implements IBrowerDriver{

	public void setSystemProperties() {
		System.setProperty("webdriver.gecko.driver","E:\\learn_resource\\web_autotest\\geckodriver.exe");
		//指定firefox执行文件路径，在firefox的安装路径下
		System.setProperty("webdriver.firefox.bin","D:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe");
	}

	public WebDriver getDriver() {
		setSystemProperties();
		DesiredCapabilities capabilities = DesiredCapabilities.firefox();
		capabilities.setCapability("marionette", true);
		WebDriver driver_firefox=new FirefoxDriver(capabilities);
		return driver_firefox;
	}

}
